#include <QtGui/QApplication>
#include "mainwindow.h"
#include "toolkit.h"
#include "myqevent.h"
#include "testwindow.h"

#include <QDir>
#include <QLocale>

bool CreatImagePath()
{
    bool bcreat = true;
#ifdef Q_OS_SYMBIAN
    QString path("e:\\OldCamera\\");
#else
    QString path("C:\\gutaoworkspace\\colleague\\weiliang\\");
#endif
    path = path.replace('/','\\');
    ToolKit::m_path = path;
    QDir directory(path);
    if(!directory.exists())
    {
        if(!directory.mkdir(path))
            bcreat = false;
    }
    return bcreat;
}

int main(int argc, char *argv[])
{   
    if(CreatImagePath())
    {
        QApplication a(argc, argv);
        ToolKit::SetGBKText();
        ToolKit::SetOrientation(true);

        QLocale locale(QLocale::system());
        ToolKit::m_language = static_cast<int>(locale.language());

        MainWindow w;
        w.showFullScreen();

//        testWindow w;
//        w.showFullScreen();

        return a.exec();
    }
    else
        return 0;
}
